﻿
// DuplicateMessageDlg.h: 头文件
//

#pragma once
#include <vector>
// CDuplicateMessageDlg 对话框
class CDuplicateMessageDlg : public CDialogEx
{
// 构造
public:
	CDuplicateMessageDlg(CWnd* pParent = nullptr);	// 标准构造函数

// 对话框数据
#ifdef AFX_DESIGN_TIME
	enum { IDD = IDD_DUPLICATEMESSAGE_DIALOG };
#endif

	protected:
	virtual void DoDataExchange(CDataExchange* pDX);	// DDX/DDV 支持


// 实现
protected:
	HICON m_hIcon;

	// 生成的消息映射函数
	virtual BOOL OnInitDialog();
	afx_msg void OnSysCommand(UINT nID, LPARAM lParam);
	afx_msg void OnPaint();
	afx_msg HCURSOR OnQueryDragIcon();
	DECLARE_MESSAGE_MAP()

	char WindowTitle[100];
	CString windowHwndText;
	CString pNowText;
	struct Data {
		CWnd* windowNameTextHwnd;
		CWnd* windowHwndTextHwnd;
		CWnd* pointTextHwnd;
		CWnd* remainingClickNumber;
		std::vector<CString>* waitInputText;
		CWnd* textBoxPoint;
		CWnd* showSendButtonPoint;
		int clickNumber;
	}; 
	Data* data = new Data();
	std::vector<CString> waitInputText;		//等待发送的文本
public:
	static CString char_CString(char* ch);
	static DWORD WINAPI  OnlyClickPerform(				//执行线程
		LPVOID lpParameter   
	);

	static DWORD WINAPI PastTextPerform(				//执行线程
		LPVOID lpParameter
	);

	static DWORD WINAPI  MouseWindowsPosition(				//获取鼠标位置线程
		LPVOID lpParameter
	);

	HANDLE threadHANDLE;
	afx_msg void OnRButtonDown(UINT nFlags, CPoint point);
	afx_msg void OnBnClickedPerform();
	afx_msg void OnBnClickedCancel();
	CEdit clickNumberInput;
	afx_msg void OnBnClickedPasttext();
	afx_msg void OnStnClickedEdittext();
	afx_msg void OnTimer(UINT_PTR nIDEvent);
};
